select * from carituru
ALTER TABLE carituru Add ManuelCari bit
UPDATE carituru set ManuelCari=0

ALTER TABLE Cari ADD ManuelCari  bit
UPDATE Cari set ManuelCari=0

ALTER TABLE servis add FaturaEntegrasyonSatis bit
UPDATE servis set FaturaEntegrasyonSatis =1

ALTER TABLE TeknikSiparis add ErpStok int


CREATE FUNCTION [dbo].[GetErpStok] 
(
	@INVENNO INT,
	@CODE NVARCHAR(100)	
)  
RETURNS INT AS  
BEGIN 
    DECLARE @RET INT;

	SET @RET=ISNULL((SELECT TOP 1 MIKTAR FROM WW_Ent_Stok_Miktar WITH(NOLOCK) WHERE INVENNO=@INVENNO AND CODE=@CODE),0);
  
	RETURN @RET;
END